package org.netty.framework.core.codec;

/**
 * 消息头结构
 * 
 * @author chenfanglin
 * @date 2018年9月28日下午5:59:01
 */
public class Header {

	/**
	 * 数据包总长度
	 */
	protected int totalLength;

	/**
	 * 消息头长度
	 */
	protected int headerLength;

	/**
	 * 协议号
	 */
	protected long cmd;

	public int getTotalLength() {
		return totalLength;
	}

	public void setTotalLength(int totalLength) {
		this.totalLength = totalLength;
	}

	public int getHeaderLength() {
		return headerLength;
	}

	public void setHeaderLength(int headerLength) {
		this.headerLength = headerLength;
	}

	public long getCmd() {
		return cmd;
	}

	public void setCmd(long cmd) {
		this.cmd = cmd;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Header [totalLength=");
		builder.append(totalLength);
		builder.append(", headerLength=");
		builder.append(headerLength);
		builder.append(", cmd=");
		builder.append(cmd);
		builder.append("]");
		return builder.toString();
	}

}
